package com.xiyu.service.vo.files.certificate.baseVO;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;
import org.springframework.format.annotation.DateTimeFormat;
import static com.xiyu.service.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
import java.time.LocalDateTime;

/**
 * 土地使用权证 Base VO，提供给添加、修改、详细的子 VO 使用
 * 如果子 VO 存在差异的字段，请不要添加到这里，影响 Swagger 文档生成
 */
@Data
public class FilesLandOwnershipBase {

    @Schema(description = "办公区ID")
    private Long areaId;

    @Schema(description = "编号")
    @Size(max = 255, message = "编号长度不能超过255")
    private String fileNo;

    @Schema(description = "使用人")
    @Size(max = 255, message = "使用人长度不能超过255")
    private String user;

    @Schema(description = "座落")
    @Size(max = 255, message = "座落长度不能超过255")
    private String location;

    @Schema(description = "地号")
    @Size(max = 255, message = "地号长度不能超过255")
    private String landNo;

    @Schema(description = "图号")
    @Size(max = 255, message = "图号长度不能超过255")
    private String mapNo;

    @Schema(description = "地类（用途）")
    @Size(max = 255, message = "地类（用途）长度不能超过255")
    private String landType;

    @Schema(description = "获得价格")
    @DecimalMax(value = "10000000000", message = "获得价格最大不能超过10000000000")
    private BigDecimal obtainPrice;

    @Schema(description = "使用权类型")
    @Size(max = 255, message = "使用权类型长度不能超过255")
    private String useType;

    @Schema(description = "终止日期")
    @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
    private LocalDateTime endDate;

    @Schema(description = "使用面积")
    @DecimalMax(value = "10000000000", message = "使用面积最大不能超过10000000000")
    private BigDecimal useArea;

    @Schema(description = "独立面积")
    @DecimalMax(value = "10000000000", message = "独立面积最大不能超过10000000000")
    private BigDecimal independentArea;

    @Schema(description = "分摊面积")
    @DecimalMax(value = "10000000000", message = "分摊面积最大不能超过10000000000")
    private BigDecimal sharedArea;

    @Schema(description = "备注")
    @Size(max = 255, message = "备注长度不能超过255")
    private String remark;

    @Schema(description = "附件")
    @Size(max = 1024, message = "附件长度不能超过1024")
    private String fileUrl;

    @Schema(description = "附件名")
    @Size(max = 255, message = "附件名长度不能超过255")
    private String fileName;

}
